{% extends "base.html" %}

  {% block title %}
    Minions_Status
  {% endblock %}

{% block head %}
     <!-- DataTables CSS -->
     <link href="/static/bower_components/datatables-plugins/integration/bootstrap/3/dataTables.bootstrap.css" rel="stylesheet">
    <!-- DataTables Responsive CSS -->
    <link href="/static/bower_components/datatables-responsive/css/dataTables.responsive.css"  rel="stylesheet">

  {% endblock %}

  {% block content %}
         <div id="page-wrapper">
            <div class="row">
                <div class="col-lg-12">
                    <h2 class="page-header">Minions Status</h2>
                </div>
                <!-- /.col-lg-12 -->
            </div>
            <!-- /.row -->
            <div class="row">
                <div class="col-lg-12">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            Minions Status
                        </div>
                        <!-- /.panel-heading -->
                        <div class="panel-body">
                            <div class="dataTable_wrapper">
                                 <table class="table table-striped table-bordered table-hover" id="dataTables-example">
                                 {% csrf_token %}
                                    <thead>
                                        <tr>
                                            <th>Minions</th>
                                            <th>Version</th>
                                           <!-- <th>Group</th> -->
                                            <th>Up/Down</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        {% for minions in status %}
                                        <tr class="odd gradeC">
                                            <td>{{ minions.minion_id }}</td>
                                            <td>{{ minions.minion_version }}</td>
                                            <!-- <td>{{ dic.group }}</td> -->
                                            {% if minions.minion_status == 'Down' %}
                                                <td style="text-align:center"><div class="btn-danger btn-xs" style="width:50px">{{ minions.minion_status }}</div></td>
                                            {% else %}
                                                <td style="text-align:center"><div class="btn-success btn-xs" style="width:50px">{{ minions.minion_status }}</div></td>
                                            {% endif %}
                                        </tr>
                                        {% endfor %}
                                    </tbody>
                                </table>
                            </div>
                            <!-- /.table-responsive -->                  
                        </div>
                        <!-- /.panel-body -->
                    </div>
                    <!-- /.panel -->
                </div>
                <!-- /.col-lg-12 -->
            </div>
            <!-- /.row -->
        </div>
        <!-- /#page-wrapper -->
     <script src="/static/bower_components/datatables/media/js/jquery.dataTables.min.js"></script>
    <script src="/static/bower_components/datatables-plugins/integration/bootstrap/3/dataTables.bootstrap.min.js"></script>
     <script type="text/javascript">
      $(document).ready(function() {
        $('#dataTables-example').DataTable({
                responsive: true
        });
    });
    // tooltip demo
    $('.tooltip-demo').tooltip({
        selector: "[data-toggle=tooltip]",
        container: "body"
    })
    // popover demo
    $("[data-toggle=popover]")
        .popover()
    </script>

  {% endblock %}
